home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Warrior’s Progress / source code / Source / Libraries / Commands / CommandHandler.h < prev    next >
Encoding:
Text File  |  1997-06-28  |  425 b   |  26 lines  |  [TEXT/CWIE]

  1. // CommandHandler.h
  2.  
  3. #ifndef CommandHandler_h
  4. #define CommandHandler_h
  5.  
  6. #ifndef CommandLink_h
  7. #include "CommandLink.h"
  8. #endif
  9.  
  10. template < class Protocol >
  11. class CommandHandler: public Protocol
  12.   {
  13.     private:
  14.         CommandLink< Protocol > link;
  15.     
  16.     public:
  17.         CommandHandler( Focus& focus )
  18.           : link( focus, *this )
  19.           {}
  20.         
  21.         Enableable& Link()                    { return link; }
  22.         const Enableable& Link() const    { return link; }
  23.   };
  24.  
  25. #endif
  26.